[Unit]
Description=Zookeeper
Before=
After=network.target

[Service]
User=zookeeper
ExecStart={{ ZOOKEEPER_HOME }}/bin/zkServer.sh start-foreground {{ ZOOKEEPER_CONFIG }}/zoo.cfg
ExecStop=/bin/kill $MAINPID
Restart=on-abort
StandardOutput=journal
EnvironmentFile={{ ZOOKEEPER_CONFIG }}/java.env
PIDFile={{ VAR_RUN_BASE }}/zookeeper/pid/zookeeper.pid

[Install]
WantedBy=multi-user.target